﻿<?xml version="1.0" encoding="utf-8"?>
<xsd:schema id="AgileProductLinerDSLSchema" targetNamespace="http://schemas.microsoft.com/dsltools/AgileProductLinerDSL" elementFormDefault="qualified" xmlns="http://schemas.microsoft.com/dsltools/AgileProductLinerDSL" xmlns:core="http://schemas.microsoft.com/VisualStudio/2008/DslTools/Core" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:import id="CoreSchema" namespace="http://schemas.microsoft.com/VisualStudio/2008/DslTools/Core" />
  <!-- Feature -->
  <xsd:element name="feature" type="Feature" substitutionGroup="featureModelElement" />
  <xsd:complexType name="Feature">
    <xsd:annotation>
      <xsd:documentation>Elements embedded in the model. Appear as boxes on the diagram.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="FeatureModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Relationship: Constrains -->
          <xsd:element name="constrainedFeatures" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of Constrains</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element ref="constrains" minOccurs="0" maxOccurs="unbounded">
                  <xsd:annotation>
                    <xsd:documentation>[Instance of Constrains needs to be serialized in full-form]</xsd:documentation>
                  </xsd:annotation>
                </xsd:element>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
          <!-- Relationship: FeatureHasTestPort -->
          <xsd:element name="testPort" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instance of FeatureHasTestPort</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:choice minOccurs="0" maxOccurs="1" >
                  <xsd:element ref="featureHasTestPort">
                    <xsd:annotation>
                      <xsd:documentation>[Relationship deriving from FeatureHasTestPort needs to be serialized in full-form]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                  <xsd:element ref="testPort" >
                    <xsd:annotation>
                      <xsd:documentation>[Target role-player]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                </xsd:choice>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
        </xsd:sequence>
        <!-- Property: Name -->
        <xsd:attribute name="name" type="xsd:string" use="required" >
          <xsd:annotation>
            <xsd:documentation>Feature name</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Occurence -->
        <xsd:attribute name="occurence" type="Occurence" >
          <xsd:annotation>
            <xsd:documentation>How often the feature occurs across multiple products of the domain</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Description -->
        <xsd:attribute name="description" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Feature description</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: IsReference -->
        <xsd:attribute name="isReference" type="xsd:boolean" >
          <xsd:annotation>
            <xsd:documentation>Wheter this feature is defined in a feature model other than this one.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: DefinitionFeatureModelFile -->
        <xsd:attribute name="definitionFeatureModelFile" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>If this feature is a reference, this property should be filled with the feature model file name containing the definition (for example, MainFeatureModel.fm). Leave this field blank otherwise.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Feature Moniker -->
  <xsd:element name="featureMoniker" type="FeatureMoniker" substitutionGroup="featureModelElementMoniker" />
  <xsd:complexType name="FeatureMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for Feature instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="FeatureModelElementMoniker">
        <xsd:attribute name="name" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Alternative -->
  <xsd:element name="alternative" type="Alternative" substitutionGroup="featureModelElement" />
  <xsd:complexType name="Alternative">
    <xsd:complexContent>
      <xsd:extension base="FeatureModelElement">
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Min -->
        <xsd:attribute name="min" type="xsd:integer" >
          <xsd:annotation>
            <xsd:documentation>Minimum number of features associated to this alternative set that should be selected when configuring a product</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Max -->
        <xsd:attribute name="max" type="xsd:integer" >
          <xsd:annotation>
            <xsd:documentation>Maximum number of features associated to this alternative set that should be selected when configuring a product</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Alternative Moniker -->
  <xsd:element name="alternativeMoniker" type="AlternativeMoniker" substitutionGroup="featureModelElementMoniker" />
  <xsd:complexType name="AlternativeMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for Alternative instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="FeatureModelElementMoniker">
        <xsd:attribute name="Id" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- FeatureModelElement -->
  <xsd:element name="featureModelElement" abstract="true" type="FeatureModelElement" substitutionGroup="core:modelElement" />
  <xsd:complexType name="FeatureModelElement" abstract="true" >
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Relationship: FeatureModelElementReferencesSubFeatureModelElements -->
          <xsd:element name="subFeatureModelElements" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of FeatureModelElementReferencesSubFeatureModelElements</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:choice minOccurs="0" maxOccurs="unbounded" >
                  <xsd:element ref="featureModelElementReferencesSubFeatureModelElements">
                    <xsd:annotation>
                      <xsd:documentation>[Relationship deriving from FeatureModelElementReferencesSubFeatureModelElements needs to be serialized in full-form]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                  <xsd:element ref="featureModelElementMoniker" >
                    <xsd:annotation>
                      <xsd:documentation>[Target role-player]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                </xsd:choice>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- FeatureModelElement Moniker -->
  <xsd:element name="featureModelElementMoniker" abstract="true" type="FeatureModelElementMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="FeatureModelElementMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for FeatureModelElement instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- FeatureModel -->
  <xsd:element name="featureModel" type="FeatureModel" substitutionGroup="core:modelElement" />
  <xsd:complexType name="FeatureModel">
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Relationship: FeatureModelHasFeatureModelElements -->
          <xsd:element name="featureModelElements" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of FeatureModelHasFeatureModelElements</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:choice minOccurs="1" maxOccurs="unbounded" >
                  <xsd:element ref="featureModelHasFeatureModelElements">
                    <xsd:annotation>
                      <xsd:documentation>[Relationship deriving from FeatureModelHasFeatureModelElements needs to be serialized in full-form]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                  <xsd:element ref="featureModelElement" >
                    <xsd:annotation>
                      <xsd:documentation>[Target role-player]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                </xsd:choice>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
          <!-- Relationship: FeatureModelHasTests -->
          <xsd:element name="tests" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of FeatureModelHasTests</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:choice minOccurs="0" maxOccurs="unbounded" >
                  <xsd:element ref="featureModelHasTests">
                    <xsd:annotation>
                      <xsd:documentation>[Relationship deriving from FeatureModelHasTests needs to be serialized in full-form]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                  <xsd:element ref="test" >
                    <xsd:annotation>
                      <xsd:documentation>[Target role-player]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                </xsd:choice>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
        </xsd:sequence>
        <!-- dslVersion -->
        <xsd:attribute name="dslVersion" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Version of the model serialized in this file.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Name -->
        <xsd:attribute name="name" type="xsd:string" use="required" >
          <xsd:annotation>
            <xsd:documentation>Feature model name</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Description -->
        <xsd:attribute name="description" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Feature model description</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: ParentFeatureModelFile -->
        <xsd:attribute name="parentFeatureModelFile" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>If this feature model is actually a detailing of a subset of a parent feature model, the parent feature model file should be specified here. Otherwise, this field shoud be left blank.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- FeatureModel Moniker -->
  <xsd:element name="featureModelMoniker" type="FeatureModelMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="FeatureModelMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for FeatureModel instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
        <xsd:attribute name="name" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Test -->
  <xsd:element name="test" type="Test" substitutionGroup="core:modelElement" />
  <xsd:complexType name="Test">
    <xsd:annotation>
      <xsd:documentation>Represents an acceptance test. It can be mapped to an acceptance test file.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Relationship: TestHasFeaturePorts -->
          <xsd:element name="featurePorts" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of TestHasFeaturePorts</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:choice minOccurs="0" maxOccurs="unbounded" >
                  <xsd:element ref="testHasFeaturePorts">
                    <xsd:annotation>
                      <xsd:documentation>[Relationship deriving from TestHasFeaturePorts needs to be serialized in full-form]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                  <xsd:element ref="featurePort" >
                    <xsd:annotation>
                      <xsd:documentation>[Target role-player]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                </xsd:choice>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
        </xsd:sequence>
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Name -->
        <xsd:attribute name="name" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>The test name showing on the test shape.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: RelativePath -->
        <xsd:attribute name="relativePath" type="xsd:string" />
        <!-- Property: ProjectUniqueName -->
        <xsd:attribute name="projectUniqueName" type="xsd:string" />
        <!-- Property: IsMapped -->
        <xsd:attribute name="isMapped" type="xsd:boolean" />
        <!-- Property: LastTestRun -->
        <xsd:attribute name="lastTestRun" type="TestResult" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Test Moniker -->
  <xsd:element name="testMoniker" type="TestMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="TestMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for Test instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
        <xsd:attribute name="Id" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- TestPort -->
  <xsd:element name="testPort" type="TestPort" substitutionGroup="core:modelElement" />
  <xsd:complexType name="TestPort">
    <xsd:annotation>
      <xsd:documentation>A test port of a feature that is connected to tests.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Relationship: TestPortReferencesFeaturePorts -->
          <xsd:element name="featurePorts" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of TestPortReferencesFeaturePorts</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:choice minOccurs="0" maxOccurs="unbounded" >
                  <xsd:element ref="testPortReferencesFeaturePorts">
                    <xsd:annotation>
                      <xsd:documentation>[Relationship deriving from TestPortReferencesFeaturePorts needs to be serialized in full-form]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                  <xsd:element ref="featurePortMoniker" >
                    <xsd:annotation>
                      <xsd:documentation>[Target role-player]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                </xsd:choice>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
        </xsd:sequence>
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- TestPort Moniker -->
  <xsd:element name="testPortMoniker" type="TestPortMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="TestPortMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for TestPort instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
        <xsd:attribute name="Id" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- FeaturePort -->
  <xsd:element name="featurePort" type="FeaturePort" substitutionGroup="core:modelElement" />
  <xsd:complexType name="FeaturePort">
    <xsd:annotation>
      <xsd:documentation>A feature port of a test that is connected to a feature.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- FeaturePort Moniker -->
  <xsd:element name="featurePortMoniker" type="FeaturePortMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="FeaturePortMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for FeaturePort instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
        <xsd:attribute name="Id" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- FeatureModelElementReferencesSubFeatureModelElements -->
  <xsd:element name="featureModelElementReferencesSubFeatureModelElements" abstract="true" type="FeatureModelElementReferencesSubFeatureModelElements" substitutionGroup="core:modelElement" />
  <xsd:complexType name="FeatureModelElementReferencesSubFeatureModelElements" abstract="true" >
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end FeatureModelElement -->
          <xsd:element ref="featureModelElementMoniker" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- FeatureModelElementReferencesSubFeatureModelElements Moniker -->
  <xsd:element name="featureModelElementReferencesSubFeatureModelElementsMoniker" abstract="true" type="FeatureModelElementReferencesSubFeatureModelElementsMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="FeatureModelElementReferencesSubFeatureModelElementsMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for FeatureModelElementReferencesSubFeatureModelElements instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Constrains -->
  <xsd:element name="constrains" type="Constrains" substitutionGroup="core:modelElement" />
  <xsd:complexType name="Constrains">
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end Feature -->
          <xsd:element ref="featureMoniker" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
        <!-- Property: ConstraintType -->
        <xsd:attribute name="constraintType" type="Constraint" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Constrains Moniker -->
  <xsd:element name="constrainsMoniker" abstract="true" type="ConstrainsMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="ConstrainsMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for Constrains instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- FeatureModelHasFeatureModelElements -->
  <xsd:element name="featureModelHasFeatureModelElements" abstract="true" type="FeatureModelHasFeatureModelElements" substitutionGroup="core:modelElement" />
  <xsd:complexType name="FeatureModelHasFeatureModelElements" abstract="true" >
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end FeatureModelElement -->
          <xsd:element ref="featureModelElement" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- FeatureModelHasFeatureModelElements Moniker -->
  <xsd:element name="featureModelHasFeatureModelElementsMoniker" abstract="true" type="FeatureModelHasFeatureModelElementsMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="FeatureModelHasFeatureModelElementsMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for FeatureModelHasFeatureModelElements instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- FeatureModelHasTests -->
  <xsd:element name="featureModelHasTests" abstract="true" type="FeatureModelHasTests" substitutionGroup="core:modelElement" />
  <xsd:complexType name="FeatureModelHasTests" abstract="true" >
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end Test -->
          <xsd:element ref="test" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- FeatureModelHasTests Moniker -->
  <xsd:element name="featureModelHasTestsMoniker" abstract="true" type="FeatureModelHasTestsMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="FeatureModelHasTestsMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for FeatureModelHasTests instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- FeatureHasTestPort -->
  <xsd:element name="featureHasTestPort" abstract="true" type="FeatureHasTestPort" substitutionGroup="core:modelElement" />
  <xsd:complexType name="FeatureHasTestPort" abstract="true" >
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end TestPort -->
          <xsd:element ref="testPort" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- FeatureHasTestPort Moniker -->
  <xsd:element name="featureHasTestPortMoniker" abstract="true" type="FeatureHasTestPortMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="FeatureHasTestPortMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for FeatureHasTestPort instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- TestHasFeaturePorts -->
  <xsd:element name="testHasFeaturePorts" abstract="true" type="TestHasFeaturePorts" substitutionGroup="core:modelElement" />
  <xsd:complexType name="TestHasFeaturePorts" abstract="true" >
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end FeaturePort -->
          <xsd:element ref="featurePort" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- TestHasFeaturePorts Moniker -->
  <xsd:element name="testHasFeaturePortsMoniker" abstract="true" type="TestHasFeaturePortsMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="TestHasFeaturePortsMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for TestHasFeaturePorts instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- TestPortReferencesFeaturePorts -->
  <xsd:element name="testPortReferencesFeaturePorts" abstract="true" type="TestPortReferencesFeaturePorts" substitutionGroup="core:modelElement" />
  <xsd:complexType name="TestPortReferencesFeaturePorts" abstract="true" >
    <xsd:annotation>
      <xsd:documentation>Visible connection between a test and a feature.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end FeaturePort -->
          <xsd:element ref="featurePortMoniker" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- TestPortReferencesFeaturePorts Moniker -->
  <xsd:element name="testPortReferencesFeaturePortsMoniker" abstract="true" type="TestPortReferencesFeaturePortsMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="TestPortReferencesFeaturePortsMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for TestPortReferencesFeaturePorts instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Enum Occurence -->
  <xsd:simpleType name="Occurence">
    <xsd:annotation>
      <xsd:documentation>How often should a feature appear in the domain products</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="Mandatory">
        <xsd:annotation>
          <xsd:documentation>The feature always occur in all product instances</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration value="Optional">
        <xsd:annotation>
          <xsd:documentation>The feature may or may not occur in a product instance</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration value="NotApply">
        <xsd:annotation>
          <xsd:documentation>Occurence does not apply to the feature</xsd:documentation>
          <xsd:documentation>Used for root domain concepts and features belonging to alternatives</xsd:documentation>
        </xsd:annotation>
      </xsd:enumeration>
    </xsd:restriction>
  </xsd:simpleType>
  
  <!-- Enum TestResult -->
  <xsd:simpleType name="TestResult">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="Ignored"/>
      <xsd:enumeration value="Successful"/>
      <xsd:enumeration value="Exception"/>
      <xsd:enumeration value="Fail"/>
      <xsd:enumeration value="None"/>
    </xsd:restriction>
  </xsd:simpleType>
  
  <!-- Enum Constraint -->
  <xsd:simpleType name="Constraint">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="Requires"/>
      <xsd:enumeration value="Excludes"/>
    </xsd:restriction>
  </xsd:simpleType>
  
</xsd:schema>

